package com.chunya.openfeign.controller;

import com.chunya.openfeign.feign.WeatherClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignController {
    @Autowired
    private WeatherClient weatherClient;

    @GetMapping("/feign")
    public String getWeather() {
        return weatherClient.getWeather();
    }
}
